/**
 * @(#)SmsShortCodeDAOImpl.java.java	1.0  18-07-2014 
 *
 * Copyright 2014 Viettel Telecome. All rights reserved.
 * VIETTEL PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */
package com.viettel.core.bussiness.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.viettel.core.dao.service.SmsShortCodeDAO;
import com.viettel.core.entities.service.SmsShortCode;
import com.viettel.core.exceptions.BusinessException;
import com.viettel.core.exceptions.DataAccessException;

/**
 *  Mô tả đoạn code bên dưới
 *  @author: toantm1
 *  @since: 18-07-2014 - 11:23:23
 */

public class SmsShortCodeMgrImpl implements SmsShortCodeMgr{
	@Autowired 
	SmsShortCodeDAO smsShortCodeDAO; 
	
	/** (non-Javadoc)
	 * @see com.viettel.core.bussiness.service.SmsShortCodeMgr#getSmsShortCodeById(java.lang.Long)
	 */
	@Override
	public SmsShortCode getSmsShortCodeById(Integer id) throws BusinessException {
		try { 
			return smsShortCodeDAO.getSmsShortCodeById(id); 
		} catch (DataAccessException e) { 
			throw new BusinessException(e); 
		} 
	}
	
	/** (non-Javadoc)
	 * @see com.viettel.core.dao.service.SmsShortCodeDAO#getListSmsShortCode()
	 */
	@Override
	public List<SmsShortCode> getListSmsShortCode() throws BusinessException {
		try { 
			return smsShortCodeDAO.getListSmsShortCode(); 
		} catch (DataAccessException e) { 
			throw new BusinessException(e); 
		} 
	}
	

}
